import { defineStore } from "pinia";
import { ref } from 'vue'
import { getTopNavListAPI } from '@/api/category'

export const useCategoryStore = defineStore('category', () => {

  const category = ref([])

  const getCategory = async () => {
    const res = await getTopNavListAPI()
    category.value = res
  }

  return {
    category,
    getCategory
  }
})
